import request from '@/utils/request'
/*
 * 获取权限角色列表
 */

export function getRoleAll() {
  return request({
    url: '/authority/getRoleAll',
    method: 'get',
  })
}

/**
 * 修改权限配置
 * @param {*} data 
 * @returns 
 */
export function updateRoles(data = {}) {
  return request({
    url: '/authority/updateRoles',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data: {
      type: 2,
      data
    }
  })
}

export function addRole(data = {}) {
  return request({
    url: '/authority/addRole',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    },
    method: 'post',
    data: {
      type: 2,
      data
    }
  })
}